﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using E2_WEBSITE.Code.Company;
using System.Collections.Generic;

namespace E2_WEBSITE
{
    public partial class Company : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                BindingCompanyInfo();
            }
        }

        private void BindingCompanyInfo()
        {
            CompanyController companyController = new CompanyController();
            List<CompanyInfo> lst = companyController.GetLstCompanyInfo();
            if (lst != null)
            {
                CellDiaChi.Text = lst[0].DiaChi;
                CellEmal.Text = lst[0].Email;
                CellNgayCapNhat.Text = lst[0].NgayCapNhat.ToString("dd/MM/yyyy");
                CellNguoiCapNhat.Text = lst[0].NguoiCapNhat.Ten + " - " + lst[0].NguoiCapNhat.Email;
                CellSDT.Text = lst[0].SDT;
                CellTenCongTy.Text = lst[0].CongTy;
            }            
        }
    }
}
